<?php
include("header.php");

$sql = "SELECT discID as id, discName as name, college_collegeid as collegeID FROM discipline ORDER BY name ASC";
$r = mysql_query($sql, $con);

$disciplines = array();
if(mysql_num_rows($r)) {
	while($discipline = mysql_fetch_assoc($r)) {
		$disciplines[] = $discipline;
	}
}

header('Content-type: application/json');
echo json_encode(array('disciplines'=>$disciplines));
//echo json_encode($disciplines);

include("footer.php");
?>